return {
  "Shatur/neovim-session-manager",
  enabled = true,
  dependencies = "nvim-lua/plenary.nvim",
  config = function()
    local Path = require "plenary.path"

    local session_manager_status, session_manager =
      pcall(require, "session_manager")
    if not session_manager_status then
      vim.notify "Not found 'neovim-session-manager' plugin"
    end

    local config = require "session_manager.config"
    session_manager.setup {
      sessions_dir = Path:new(vim.fn.stdpath "data", "sessions"),
      autoload_mode = config.AutoloadMode.LastSession, -- config.AutoloadMode.CurrentDir
      autosave_last_session = true,
      autosave_ignore_not_normal = true,
      autosave_ignore_dirs = {},
      autosave_ignore_filetypes = {
        "gitcommit",
        "gitrebase",
      },
      autosave_ignore_buftypes = {},
      autosave_only_in_session = false,
      max_path_length = 80,
    }

    -- 自动打开上一次的退出时的布局
    vim.api.nvim_create_autocmd({ "User" }, {
      pattern = "SessionLoadPost",
      callback = function()
        -- 打开nvim-tree文件菜单
        require("nvim-tree.api").tree.toggle(false, true)
      end,
    })
  end,
}
